package billrouter

import (
	"github.com/gin-gonic/gin"
	"nodeseller/repositories"
	"nodeseller/response"
)

//查询自己的账单
func FindAllBill(c *gin.Context)  {
	phone,err := c.Cookie("phone")
	if err != nil{
		response.Response1(c,1,"身份验证失败，请重新登陆","")
		return
	}
	result,err := repositories.NewBillManager().FindAll(phone)
	if err != nil{
		response.Response1(c,1,"数据错误，请稍后重试","")
		return
	}
	response.Response1(c,0,"查询成功",result)
}